// 파일업로드
(function(){
	var pluginName = "uploadfile";
	
	CKEDITOR.plugins.add(pluginName, {
		init: function(editor){
			editor.addCommand(pluginName, {
				exec: function(editor){
					var theSelectedText = editor.getSelection().getNative();
  					$(editor).trigger("uploadFile");
				}
			});
			editor.ui.addButton("uploadfile", {
				label: "Upload Image"
				, icon: this.path + "uploadfile.png"
				, command: pluginName
				//, className: "cke_button_" + pluginName
			});
			
			editor.on("instanceReady", function(){
				$(".cke_button_uploadfile span.cke_icon").css("width", "100px");
			});
		}
	});
})();